package my.service;

import java.sql.SQLException;
import java.util.List;

import my.bean.Tea;

public interface ITeaService {
	/**
	 * add tea into TEA
	 * @param tea
	 * @return the count of record successfully insert into TEA
	 * @throws SQLException
	 */
	public int addTea(Tea tea) throws SQLException;

	/**
	 * add a tea list into TEA
	 * @param list
	 * @throws SQLException
	 */
	public void addTeaList(List<Tea> list) throws SQLException;

	/**
	 * delete tea from TEA by id
	 * @param id
	 * @return the count of record successfully delete
	 * @throws SQLException
	 */
	public int deleteTeaById(int id) throws SQLException;

	/**
	 * modify 
	 * @param tea
	 * @return a count of record successfully modify
	 * @throws SQLException
	 */
	public int modifyTeaMessage(Tea tea) throws SQLException;

	/**
	 * find all of tea
	 * @return the list of all tea
	 */
	public List<Tea> findAll();

	/**
	 * find the list of tea where name like 'name'
	 * @param name
	 * @return the list of tea
	 */
	public List<Tea> findTeaByName(String name);

	/**
	 * find the list of tea by a type
	 * @param type
	 * @return the list of the type
	 */
	public List<Tea> findTeaByType(int type);

	/**
	 * find the tea by id
	 * @param id 
	 * @return the tea 
	 */
	public Tea findTeaById(int id);
}
